<template>
  <view>
    <view class="unction_list">
      <view class="unction_btn " @click="goToPage('/pages/user/personalData')">
        <text class="font_div">个人资料</text>
        <view class="arrow"> </view>
      </view>
      <view class="unction_btn" @click="goToPage('/pages/user/forgetPw')">
        <text class="font_div">登录密码</text>
        <view class="arrow"> </view>
      </view>
      <view class="unction_btn" @click="goToPage('/pages/user/findPaymentPw')">
        <text class="font_div">支付密码</text>
        <view class="arrow"> </view>
      </view>
      <view class="unction_btn" @click="goToPage('/pages/user/realNameAuthentication')">
        <text class="font_div">实名认证</text>
        <view class="arrow"> </view>
      </view>
    </view>
    <view class="uni-padding-wrap uni-common-mt">
      <button type="primary" @click="SafeExitClick">安全退出</button>
    </view>
  </view>
</template>

<script>
import { logoutApi } from '@/service/user/user.service.js'
export default{
  data () {
    return {
      // 
    }
  },
  methods: {
    goToPage (url) {
      if (url) {
        uni.navigateTo({
          url: url
        })
      }
    },
    //安全退出
    SafeExitClick() {
      logoutApi({}, res => {
        if (res.status == 0) {
          uni.showToast({
            title: '登出成功！',
            success: () => {
              setTimeout(function () {
                uni.clearStorageSync();
                
              }, 2000);
            }
          })
        }
      }, null, {showErrorMsg: true});
    }
  }
}
  
</script>

<style lang="scss" scoped>
  .font_div{
    font-size:28rpx;
    font-family:PingFang SC;
    font-weight:500;
    color:rgba(51,51,51,1);
  }
  .unction_list{
    width: 100%;
    background:#FFF;
  }
  /* 列表 */
  .unction_btn {
    width: 718.8rpx;
    height: 97rpx;
    line-height: 97rpx;
    border-bottom: 2rpx solid #E1E1E1;
    opcity: 0.5;
    position: relative;
    margin-left:31rpx;
    &:last-child {
      border-bottom: none;
    }
  }
  .unction_btn>text {
   
    position: absolute;
    left: 8rpx;
  }
  
  .unction_btn .arrow{
    position: absolute;
    right: 29rpx;
    top: 40rpx;
  }
  /* 三角形 */
    .arrow {
      border-right: 3rpx solid #8A8A8A;
      border-top: 3rpx solid #8A8A8A;
      height: 18rpx;
      width: 18rpx;
      transform: rotate(45deg);
      -webkit-transform: rotate(45deg);
      /*不加这两个属性三角会比上一个略丑, 大家可以试一下*/
      border-left: 2rpx solid transparent;
      border-bottom: 2rpx solid transparent;
    }
  /* 下面的button按钮 */
  .uni-common-mt button {
    width: 687rpx;
    height: 70rpx;
    background: #434343;
    font-size:30rpx;
    font-family: PingFang SC;
    font-weight: 500;
    color: rgba(246, 218, 153, 1);
    margin:21rpx auto;
  }
  .uni-common-mt{
    width: 100%;
    position:absolute;
    bottom:0;
    height: 112rpx;
    border-top:2rpx solid #E1E1E1;
  }
</style>
